package com.bzg.spring.component;

import com.bzg.spring.annotation.MyAutowired;
import com.bzg.spring.annotation.MyComponent;
import com.bzg.spring.application.MyInitializingBean;

//@MyComponent
public class MyService implements MyInitializingBean {

	@MyAutowired
	UserInterface userService;  // 在该对象被jdk代理后，要采用接口类型进行定义

	public void test() {
		System.out.println("spring-test");
	}
	public void test1() {
		System.out.println(userService);
	}

	@Override
	public void afterPropertiesSet() {
		System.out.println("myService初始化");
	}
}
